Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThis PR migrates linting from ESLint to oxlint: dev dependency bumps, ESLint config removal, new .oxlintrc.json added, lint scripts updated, and numerous inline ESLint suppression comments adjusted or removed; no functional code changes. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsGit: Failed to clone repository. Please run the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (3)
packages/uniwind/src/core/web/cssListener.ts (1)
53-58: Returning a no-op from insideforEachis dead code.
Array.prototype.forEachignores callback return values, soreturn () => {}on line 57 just exits the current iteration; the empty function is never used. A barereturnis equivalent and clearer.♻️ Proposed tweak
if (!mediaQuery) { - return () => {} + return }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/uniwind/src/core/web/cssListener.ts` around lines 53 - 58, The forEach callback in cssListener.ts is returning a no-op function which is never used because Array.prototype.forEach ignores return values; update the loop in the method that calls classNames.split(' ') so that when classNameMediaQueryListeners.get(className) is falsy you use a bare return to skip the iteration (or switch to a for...of and use continue/collect listeners as needed), and ensure any intended listener functions are actually collected/returned by referencing classNameMediaQueryListeners and the surrounding method name so the empty function is not erroneously produced.packages/uniwind/.oxlintrc.json (2)
17-28:ignorePatternsdoesn't cover**/*.d.tsbroadly.The individual
*.d.tsentries (types.d.ts,no-types.d.ts,src/metro/index.d.ts,src/vite/index.d.ts) suggest intent to skip declaration files. A single**/*.d.tspattern would cover current + future declaration files and is easier to maintain. Optional.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/uniwind/.oxlintrc.json` around lines 17 - 28, The ignorePatterns currently lists specific declaration files (types.d.ts, no-types.d.ts, src/metro/index.d.ts, src/vite/index.d.ts) which is brittle; update the "ignorePatterns" array in .oxlintrc.json to replace those individual entries with a single glob pattern "**/*.d.ts" so all current and future TypeScript declaration files are ignored consistently while keeping other entries (dist, specs, jest.config.js, tests, babel.config.cjs) unchanged.
15-15: Confirm intent of disablingtypescript/no-implied-evalglobally.Disabling
no-implied-evalrepo-wide silences a real security signal (setTimeout("code"),new Function(...)etc.). If it's being turned off to suppress a specific false positive, consider scoping it with inline directives instead.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/uniwind/.oxlintrc.json` at line 15, You've globally disabled the typescript/no-implied-eval rule which mutes an important security check; either confirm this intent or revert the global rule and instead apply scoped exceptions where necessary by leaving the rule enabled and adding per-file or per-line disables for the specific false positives (use inline eslint-disable-next-line or eslint-disable comments targeting typescript/no-implied-eval) or change the config to "warn" rather than "off"; update the .oxlintrc.json entry for typescript/no-implied-eval accordingly and remove the global "off" if you choose scoped suppressions.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@packages/uniwind/src/core/web/cssListener.ts`:
- Line 131: Replace the malformed oxlint disable directive string in
packages/uniwind/src/core/web/cssListener.ts: locate the comment "//
oxlint-disable-next-line typescript-eslint(strict-boolean-expressions)" and
change it to use the rule name with a slash, i.e. "// oxlint-disable-next-line
typescript/strict-boolean-expressions" so the suppression matches the
.oxlintrc.json rule key and takes effect.
In `@packages/uniwind/src/metro/metro-css-patches.ts`:
- Line 29: Update the oxlint disable directives to use the plugin/rule
forward-slash format: replace the directive token
"typescript-eslint(unbound-method)" in the oxlint-disable-next-line comment in
metro-css-patches.ts with "typescript/unbound-method", and likewise replace
"typescript-eslint(strict-boolean-expressions)" in the oxlint-disable-next-line
comment in cssListener.ts (around the existing disable at the same site) with
"typescript/strict-boolean-expressions" so the linter recognizes and suppresses
those rules correctly.
---
Nitpick comments:
In `@packages/uniwind/.oxlintrc.json`:
- Around line 17-28: The ignorePatterns currently lists specific declaration
files (types.d.ts, no-types.d.ts, src/metro/index.d.ts, src/vite/index.d.ts)
which is brittle; update the "ignorePatterns" array in .oxlintrc.json to replace
those individual entries with a single glob pattern "**/*.d.ts" so all current
and future TypeScript declaration files are ignored consistently while keeping
other entries (dist, specs, jest.config.js, tests, babel.config.cjs) unchanged.
- Line 15: You've globally disabled the typescript/no-implied-eval rule which
mutes an important security check; either confirm this intent or revert the
global rule and instead apply scoped exceptions where necessary by leaving the
rule enabled and adding per-file or per-line disables for the specific false
positives (use inline eslint-disable-next-line or eslint-disable comments
targeting typescript/no-implied-eval) or change the config to "warn" rather than
"off"; update the .oxlintrc.json entry for typescript/no-implied-eval
accordingly and remove the global "off" if you choose scoped suppressions.
In `@packages/uniwind/src/core/web/cssListener.ts`:
- Around line 53-58: The forEach callback in cssListener.ts is returning a no-op
function which is never used because Array.prototype.forEach ignores return
values; update the loop in the method that calls classNames.split(' ') so that
when classNameMediaQueryListeners.get(className) is falsy you use a bare return
to skip the iteration (or switch to a for...of and use continue/collect
listeners as needed), and ensure any intended listener functions are actually
collected/returned by referencing classNameMediaQueryListeners and the
surrounding method name so the empty function is not erroneously produced.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 695d098a-070c-4430-9878-a2c29f2a908f
⛔ Files ignored due to path filters (1)
bun.lockis excluded by!**/*.lock
📒 Files selected for processing (19)
dprint.jsonpackage.jsonpackages/uniwind/.oxlintrc.jsonpackages/uniwind/eslint.config.tspackages/uniwind/package.jsonpackages/uniwind/src/core/config/config.common.tspackages/uniwind/src/core/logger.tspackages/uniwind/src/core/native/parsers/transforms.tspackages/uniwind/src/core/native/store.tspackages/uniwind/src/core/web/cssListener.tspackages/uniwind/src/hoc/withUniwind.native.tsxpackages/uniwind/src/metro/addMetaToStylesTemplate.tspackages/uniwind/src/metro/logger.tspackages/uniwind/src/metro/metro-css-patches.tspackages/uniwind/src/metro/processor/css.tspackages/uniwind/src/metro/processor/functions.tspackages/uniwind/src/metro/utils/common.tspackages/uniwind/src/metro/utils/serialize.tspackages/uniwind/src/types.ts
💤 Files with no reviewable changes (11)
- packages/uniwind/src/core/native/store.ts
- packages/uniwind/src/types.ts
- packages/uniwind/src/metro/logger.ts
- packages/uniwind/src/core/logger.ts
- packages/uniwind/src/metro/processor/css.ts
- packages/uniwind/src/hoc/withUniwind.native.tsx
- packages/uniwind/src/metro/utils/serialize.ts
- packages/uniwind/src/metro/utils/common.ts
- packages/uniwind/src/metro/processor/functions.ts
- packages/uniwind/eslint.config.ts
- packages/uniwind/src/core/native/parsers/transforms.ts
|
🚀 This pull request is included in v1.6.3. See Release v1.6.3 for release notes. |
Summary by CodeRabbit